$(() => {
  let menuPosts = $("#menu-posts");
  let menuSettings = $("menu-settings");
  let routerName = kits.getRouterName(location.href);
  if (
    routerName == "posts" ||
    routerName == "post-add" ||
    routerName == "categories"
  ) {
    menuPosts.addClass("in").attr("aria-expanded", true);
    menuPosts
      .parent()
      .find(".collapsed")
      .removeClass("collapsed");
  }
  if (
    routerName == "nav-menus" ||
    routerName == "slides" ||
    routerName == "settings"
  ) {
    menuSettings.addClass("in").attr("aria-expanded", true);
  }

  // 这里真的不用排他吗
  $("#" + routerName).addClass("active");
});
